@model EIMS.Models.Employee

@{
    ViewData["Title"] = "删除员工";
}

<div class="container-fluid px-4">
    <h1 class="mt-4">@ViewData["Title"]</h1>
    <ol class="breadcrumb mb-4">
        <li class="breadcrumb-item"><a asp-controller="Home" asp-action="Index">首页</a></li>
        <li class="breadcrumb-item"><a asp-controller="Employees" asp-action="Index">员工管理</a></li>
        <li class="breadcrumb-item active">删除员工</li>
    </ol>
    
    <div class="card mb-4">
        <div class="card-header">
            <i class="fas fa-exclamation-triangle text-warning me-1"></i>
            确认删除
        </div>
        <div class="card-body">
            <div class="alert alert-danger">
                <h4>您确定要删除此员工记录吗？</h4>
                <p>此操作将永久删除该员工所有记录，包括历史记录，且无法恢复。</p>
            </div>
            
            <div class="row">
                <div class="col-md-8">
                    <dl class="row">
                        <dt class="col-sm-3">
                            @Html.DisplayNameFor(model => model.EmployeeNumber)
                        </dt>
                        <dd class="col-sm-9">
                            @Html.DisplayFor(model => model.EmployeeNumber)
                        </dd>
                        
                        <dt class="col-sm-3">
                            @Html.DisplayNameFor(model => model.Name)
                        </dt>
                        <dd class="col-sm-9">
                            @Html.DisplayFor(model => model.Name)
                        </dd>
                        
                        <dt class="col-sm-3">
                            @Html.DisplayNameFor(model => model.Department)
                        </dt>
                        <dd class="col-sm-9">
                            @(Model.Department?.Name ?? "-")
                        </dd>
                        
                        <dt class="col-sm-3">
                            @Html.DisplayNameFor(model => model.HireDate)
                        </dt>
                        <dd class="col-sm-9">
                            @Model.HireDate.ToString("yyyy-MM-dd")
                        </dd>
                        
                        <dt class="col-sm-3">
                            @Html.DisplayNameFor(model => model.Status)
                        </dt>
                        <dd class="col-sm-9">
                            @if (Model.Status == EIMS.Models.Enums.EmployeeStatus.Active)
                            {
                                <span class="badge bg-success">@Html.DisplayFor(model => model.Status)</span>
                            }
                            else if (Model.Status == EIMS.Models.Enums.EmployeeStatus.OnLeave)
                            {
                                <span class="badge bg-warning">@Html.DisplayFor(model => model.Status)</span>
                            }
                            else
                            {
                                <span class="badge bg-danger">@Html.DisplayFor(model => model.Status)</span>
                            }
                        </dd>
                    </dl>
                </div>
                <div class="col-md-4 text-center">
                    <div class="mb-3">
                        <i class="fas fa-user-circle fa-7x text-danger"></i>
                    </div>
                    <h5>@Model.Name</h5>
                    <p class="text-muted">@Model.EmployeeNumber</p>
                </div>
            </div>
            
            <form asp-action="Delete" method="post">
                <input type="hidden" asp-for="Id" />
                <div class="mt-3">
                    <a asp-action="Index" class="btn btn-secondary">返回列表</a>
                    <button type="submit" class="btn btn-danger">
                        <i class="fas fa-trash me-1"></i> 确认删除
                    </button>
                </div>
            </form>
        </div>
    </div>
</div> 